<?php
	include 'public.php';
	//查询用户数据
	$id = $_SESSION['home']['id'];
	$sql = "select * from ".PRE."user where id='{$id}'";
	$result = mysql_query($sql);
	$userinfo = mysql_fetch_assoc($result);
?>

	<div class="admin_main_nav">个人信息&gt;&gt;详情列表</div>
			<div class="userinfo">
					<div class="mt20">
						<table cellspacing="0" cellpadding="0" width="800">
							<tr class="color">
								<th width="150">用户ID：</th>
								<td><?php echo $userinfo['id']?></td>
								<td rowspan="6" width="200">
									<img src="<?php echo APP.'/upload/user/'.$userinfo['touxiang']?>" title="个人头像" alt="个人头像"/>
								</td>
							</tr>
							<tr class="color">
								<th>用户名：</th>
								<td><?php echo $userinfo['name']?></td>
							</tr>
							<tr class="color">
								<th>性别：</th>
								<td><?php 
								switch($userinfo['sex']){
									case '0': echo '女'; break; 
									case '1': echo '男'; break; 
									case '2': echo '保密'; break; 
								}
								?></td>
							</tr>
							<tr class="color">
								<th>电话：</th>
								<td><?php echo $userinfo['tel']?></td>
							</tr>
							<tr class="color">
								<th>邮箱：</th>
								<td><?php echo $userinfo['email']?></td>
							</tr>
							<tr class="color">
								<th>地址：</th>
								<td><?php echo $userinfo['address']?></td>
							</tr>
							<tr class="color">
								<th>个性签名：</th>
								<td colspan="2"><?php echo $userinfo['sign']?></td>
							</tr>
							<tr class="color">
								<th>生日：</th>
								<td colspan="2"><?php echo $userinfo['birthday']?></td>
							</tr>
							<tr class="color">
								<th>注册时间：</th>
								<td colspan="2"><?php echo date('Y-m-d H:i:s',$userinfo['reg_time'])?></td>
							</tr>
							<tr class="color">
								<th>最后登录时间：</th>
								<td colspan="2"><?php echo date('Y-m-d H:i:s',$userinfo['login_time'])?></td>
							</tr>
							<tr class="color">
								<th>用户积分：</th>
								<td colspan="2"><?php echo $userinfo['jifen']?></td>
							</tr>
							<tr>
								<th colspan="3" class="submit"> <a href="updateuser.php">更新个人信息</a>　<a href="password.php"> 修改密码</a></th>
							</tr>
						</table>
					</div>
			</div>

<?php include 'public_b.php';?>

